<!--
 * @Description: 垂直居中
 * @Author: zzj
 * @Date: 2021-08-25 15:10:33
 * @LastEditors: zzj
 * @LastEditTime: 2021-08-25 15:30:38
-->
<!DOCTYPE html>
<html lang="en">
<head>
    <meta charset="UTF-8">
    <meta http-equiv="X-UA-Compatible" content="IE=edge">
    <meta name="viewport" content="width=device-width, initial-scale=1.0">
    <title>垂直居中</title>
    <style>
        .box{
            background-color: lightseagreen;
            color: white;
            margin-bottom: .5em;
        }
    </style>
</head>
<body>
    <div class="box">
        <input type="text">
        <span>span</span>
        <span>中国话</span>
        <button>按钮</button>
        <img src="./1.webp" height="100px" alt="">
    </div>
    <div class="box">
        <span>中国话</span>
        <img src="./1.webp" height="100px" alt="" style="vertical-align: middle;">
    </div>
    <div class="box" style="font-size: 0;">
        <img src="./1.webp" height="100px" alt="" >
    </div>
</body>
</html>